<style type="text/css">
	.g_list .mytd{height:25px;}
	.title_pic{float: left;}
	.title{float:right;width:70%;}
	.text-center{font-size: 14px;}
	.zhankais{cursor: pointer;float: right;color:#f88e2d;font-size: 13px;}
</style>
<script type="text/javascript"> 
jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件  
return this.each(function(){ 
var that; 
$('tr', this).each(function(row) { 
$('td:eq('+colIdx+')', this).filter(':visible').each(function(col) { 
if (that!=null && $(this).html() == $(that).html()) { 
rowspan = $(that).attr("rowSpan"); 
if (rowspan == undefined) { 
$(that).attr("rowSpan",1); 
rowspan = $(that).attr("rowSpan"); } 
rowspan = Number(rowspan)+1; 
$(that).attr("rowSpan",rowspan); 
$(this).hide(); 
} else { 
that = this; 
} 
}); 
}); 
}); 
}

$(function() {
	$(".g_list").rowspan(5);
	$(".g_list").rowspan(6);
	$(".g_list").rowspan(7);
	$(".g_list").rowspan(8);
	$(".g_list").rowspan(9);

$(".zhankais").click(function(){
	var pd=$(this).text();
	var myrel=$(this).attr('rel');
	if(pd=='收回明细'){
		$(this).text('展开明细');
		$(this).removeClass('glyphicon-chevron-up');
		$(this).addClass('glyphicon-chevron-down');
		
	}else{
		$(this).removeClass('glyphicon-chevron-down');
		$(this).addClass('glyphicon-chevron-up');
		$(this).text('收回明细');
	}
	$(".zhankai"+myrel).slideToggle();
	}); 
}); 

</script>
             <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                <div class="table-responsive">
                    <table class="table table-bordered" style="font-size:13px;">
                                <tbody>
                                <volist name="orderList" id="list">
                                    <tr style="border-bottom: 2px #fff solid;">
                                        <td class="text-center" style="background:#e2e8ff;">
                                        	<input type="checkbox" name="selected[]" value="6">
                                        	<input type="hidden" name="shipping_code[]" value="flat.flat">
											<span class="glyphicon glyphicon-chevron-up zhankais" rel="{$list.order_id}">收回明细</span>
                                        </td>
                                        <td class="text-center" style="background:#e2e8ff;">单号：{$list.order_sn}</td>
                                        <td class="text-center" style="background:#e2e8ff;">状态：{$order_status[$list[order_status]]}<if condition="$list['is_cod'] eq '1'"><span style="color: red">(货到付款)</span></if></td>
                                        
                                        <td class="text-center" style="background:#e2e8ff;">发货：{$shipping_status[$list[shipping_status]]}</td>
                                        <td class="text-center" style="background:#e2e8ff;">下单时间：{$list.add_time|date='Y-m-d H:i',###}</td>
                                        <td class="text-center" style="background:#e2e8ff;">店铺：<a href="/index.php/Seller/Admin/login/store_id/{$list.store_id}" target="_blank">{$store_list[$list[store_id]]}</a></td>
                                        <td class="text-right" style="background:#e2e8ff;">
                                                 <a href="{:U('Admin/order/detail',array('order_id'=>$list['order_id']))}" data-toggle="tooltip" title="" class="btn btn-info" data-original-title="查看详情"><i class="fa fa-eye"> 查看</i></a>
												 <a href="/index.php/admin/Order/order_prints/order_id/{$list.order_id}" target="_blank" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="打印订单"><i class="fa fa-print"></i>打印订单
												                                                  </a>
                                                 
<!--                                                 <if condition="($list['order_status'] eq 3) or ($list['order_status'] eq 5)">-->
<!--                                                        <a href="{:U('Admin/order/delete_order',array('order_id'=>$list['order_id']))}"  data-toggle="tooltip" title="" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a>-->
<!--                                        	<else/>-->
<!--                                        		<a href="javascript:void(0)" onclick="alert('该订单不得删除')" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="删除"><i class="fa fa-trash-o"></i></a>-->
<!--                                        	</if>-->
                                                
                                        </td>
                                    </tr>
<tr class="zhankai{$list.order_id}">
	<td class="text-center" colspan="12" style="padding:0;">
<table class="table table-bordered g_list" style="font-size:13px;width:100%;">
<tr>
		<td width="200" class="mytd">产品名</td>
		<td width="110" class="mytd">单价</td> 
		<td width="90" class="mytd">数量</td>
		<td width="90" class="mytd">小计</td>
		<td width="80" class="mytd">平台扣点</td>
		<td width="80" class="mytd">平台收益</td>
		<td width="120" class="mytd">收件人</td>
		<td width="120" class="mytd">联系电话</td>
		<td width="130" class="mytd">总金额</td>
</tr>
<?php
$points_count=0;
?>
<volist name="list.g_list" id="lists">
	<?php
	$points_count+=sanwei($lists['points']*$lists['member_goods_price']*$lists['goods_num']/100);
	?>
	<tr>
		<td style="text-align:left;">
			<img src="{$lists.original_img}" height="50" width="50" class="title_pic" onmouseover="layer.tips('<img src={$lists.original_img} width=180>',this,{tips: [1, '#e2e8ff']});" onmouseout="layer.closeAll();">
			<div class="title">{$lists.goods_name}</div>
			<div class="title" style="color:#8e8a8a;">{$lists.spec_key_name}</div>
			</td>
		<td class="mytd">￥{$lists.member_goods_price}</td> 
		<td class="mytd">{$lists.goods_num}</td>
		<td class="mytd">{:sanwei(($lists['member_goods_price']*$lists['goods_num']),3)}</td>
		<td class="mytd">{$lists.points}%</td>
		<td class="mytd" style="color: blue;">{:sanwei(($lists['points']*$lists['member_goods_price']*$lists['goods_num'])/100,3)}</td>
		<td class="mytd">{$list.consignee}（{$list.company}）</td>
		<td class="mytd">{$list.mobile}</td>
		<td class="mytd" style="font-weight: bold;color: red;">{$list.goods_price}</td>
	</tr>
</volist>
<tr>
	<td class="text-right" colspan="5">平台总收益：</td> 
	<td class="text-center" style="color: blue;font-weight: bold;">{:sanwei($points_count)}</td>
	<td class="text-right" colspan="2" style="font-weight: bold;">应付：</td>
	<td class="text-center" style="color: red;font-weight: bold;">{:sanwei($list['order_amount']-$points_count)}</td>
	</tr>
<tr>
	<td class="text-center" colspan="6" style="">
		<b>平台改单：</b>
					<if condition="$list.admin_note eq ''">
							<span style="color:#999;">未改单</span>
					<else/>
							<span style="color:red;">改价：<b>￥{$list.discount}</b>，{$list.admin_note|htmlspecialchars_decode}</span>
					</if>
	</td>
	<td class="text-center" colspan="1" style="color:green;">入库：（{$list.ruku}件）</td>
    <td class="text-center" colspan="1" style="color:red;">发货：（{$list.chuku}件）</td>
	<td class="text-center" colspan="1">
		标签数：<b style="color: red;">{$list.jian_count}</b>
	</td>
</tr>
</table>
	</td>
</tr>

                                </volist>
                                </tbody>
                            </table>
                        </div>
                    </form>
                    <div class="row">
                        <div class="col-sm-6 text-left"></div>
                        <div class="col-sm-6 text-right">{$page}</div>
                    </div>
<script>
    $(".pagination  a").click(function(){
        var page = $(this).data('p');
        ajax_get_table('search-form2',page);
    });
</script>